home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / pc / explorer / ex_funct.dxr / 00046.ls < prev    next >
Encoding:
Text File  |  1997-07-22  |  718 b   |  23 lines

  1. on enterFrame
  2.   global x, y, r, theta
  3.   if the hilite of cast "Degrees" then
  4.     set theta to float(field "Theta") * PI / 180.0
  5.   else
  6.     set theta to float(field "Theta")
  7.   end if
  8.   set the floatPrecision to 1
  9.   put r * cos(theta) into field "X"
  10.   put r * sin(theta) into field "Y"
  11.   set the floatPrecision to 3
  12.   put cos(theta) into field "Cos"
  13.   put sin(theta) into field "Sin"
  14.   set the textSize of field "X" to 32
  15.   set the textSize of field "Y" to 32
  16.   set the textSize of field "R" to 32
  17.   set the textSize of field "Theta" to 32
  18.   set the textStyle of field "X" to "bold"
  19.   set the textStyle of field "Y" to "bold"
  20.   set the textStyle of field "R" to "bold"
  21.   set the textStyle of field "Theta" to "bold"
  22. end
  23.